package club.caihappy.config;

import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.TypeFilter;

import java.io.IOException;

/**
 * Created by DELL on 2021/10/4
 **/
public class MyTypeFilter implements TypeFilter {
    public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException {
        String classname=metadataReader.getClassMetadata().getClassName();
        System.out.println("===>"+classname);
        if (classname.contains("er")){
            return true;
        }
        return false;
    }
}
